Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build project in OSX #7

Open
jabrena opened this issue Oct 22, 2022 · 2 comments
Open

Build project in OSX #7

jabrena opened this issue Oct 22, 2022 · 2 comments

Comments

@jabrena
Copy link

jabrena commented Oct 22, 2022

Hi,

I am trying to run the example this example:
https://github.com/jabrena/101-rust/blob/main/hello_world_wasm_backend/README.md

But I was not able to compile in OSX, I am receiving the following error:

docker compose build
[+] Building 1.3s (14/14) FINISHED                                                                                          
 => [internal] load build definition from Dockerfile                                                                   0.0s
 => => transferring dockerfile: 32B                                                                                    0.0s
 => [internal] load .dockerignore                                                                                      0.0s
 => => transferring context: 2B                                                                                        0.0s
 => [internal] load metadata for docker.io/library/rust:1.64                                                           1.2s
 => [buildbase 1/5] FROM docker.io/library/rust:1.64@sha256:922d814994d77f8e3ab8a7db45a277e9cebe41a557046eeef91a2e34b  0.0s
 => [internal] load build context                                                                                      0.0s
 => => transferring context: 86B                                                                                       0.0s
 => CACHED [buildbase 2/5] RUN rustup target add wasm32-wasi                                                           0.0s
 => CACHED [buildbase 3/5] WORKDIR /src                                                                                0.0s
 => CACHED [buildbase 4/5] COPY src ./src                                                                              0.0s
 => CACHED [buildbase 5/5] COPY Cargo.toml .                                                                           0.0s
 => CACHED [buildserver 1/3] COPY src ./src                                                                            0.0s
 => CACHED [buildserver 2/3] RUN pwd                                                                                   0.0s
 => CACHED [buildserver 3/3] RUN --mount=type=cache,target=/usr/local/cargo/git/db     --mount=type=cache,target=/usr  0.0s
 => CACHED [server 1/1] COPY --from=buildserver /src/target/wasm32-wasi/release/wasmedge_hyper_server.wasm wasmedge_h  0.0s
 => ERROR exporting to image                                                                                           0.0s
 => => exporting layers                                                                                                0.0s
 => => writing image sha256:9811b6619248d3846ca8c70d463c359854511b6539541b40dbfcb799b80e64f2                           0.0s
------
 > exporting to image:
------
failed to solve: operating system is not supported

docker compose up          
[+] Running 0/0
 ⠋ Container hello_world_wasm_backend-server-1  Creating                                                                                                                   0.0s
Error response from daemon: Unknown runtime specified io.containerd.wasmedge.v1

How to build the example in OSX?

Many thanks in advance

Juan Antonio

@juntao
Copy link
Member

juntao commented Oct 22, 2022

Hi,

The docker compose option would require a new version of Docker, which we will announce on Monday at KubeCon. I will update here once Docker made the release.

For now, you can follow the step by step instructions in the doc to build, run, and test. However, I believe the networking sockets still have some issues on Mac OS. Linux would probably be more reliable for now ...

Cheers
Michael

@alabulei1
Copy link

Hi @jabrena,

You can run it on Docker for Mac OSX, as Docker has announced the technical review. https://docs.docker.com/desktop/wasm/

We are also fixing the problems on OSX. See this PR. WasmEdge/WasmEdge#2105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants